<template>
  <el-button
    v-if="refresh"
    :icon="Refresh"
    circle
    @click="emit('refresh')"
  />
  <el-button
    v-if="setCol"
    :icon="Operation"
    circle
    @click="emit('setting')"
  />
</template>

<script lang="ts">
export default {
  name: "Toolbar",
};
</script>
<script setup lang="ts">
import { ToolbarProps } from '@/types/table';
import { Refresh, Operation } from "@element-plus/icons-vue";

// 接受父组件参数，配置默认值
const props = withDefaults(defineProps<ToolbarProps>(), {
  refresh: true,
  setCol: true,
});

const emit = defineEmits(["refresh", "setting"]);

</script>

<style>
.el-button {
  margin-bottom: 10px;
}
</style>
